package org.example.est.entity;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * malfunction_options
 * @author 
 */
@Data
public class MalfunctionOptions implements Serializable {
    private Long id;

    /**
     * 商品型号id
     */
    private Long modelid;

    /**
     * 故障id
     */
    private Long malfid;

    /**
     * 名称
     */
    private String optionname;

    /**
     * 是否有提示0:否,1:是)
     */
    private Integer ishint;

    /**
     * 提示信息
     */
    private String hintinfo;

    /**
     * 提示图片
     */
    private String hintimg;

    /**
     * 处理方式（1:维修,2:更换配件）
     */
    private Integer processtype;

    /**
     * 本项问题价格占比（最大100）
     */
    private Integer ratio;

    /**
     * 创建人
     */
    private Long createduserid;

    /**
     * 修改人
     */
    private Long updateduserid;

    /**
     * 创建时间
     */
    private Date createdtime;

    /**
     * 修改时间
     */
    private Date updatedtime;

    /**
     * 是否删除(0:否,1:是)
     */
    private Integer isdelete;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MalfunctionOptions other = (MalfunctionOptions) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getModelid() == null ? other.getModelid() == null : this.getModelid().equals(other.getModelid()))
            && (this.getMalfid() == null ? other.getMalfid() == null : this.getMalfid().equals(other.getMalfid()))
            && (this.getOptionname() == null ? other.getOptionname() == null : this.getOptionname().equals(other.getOptionname()))
            && (this.getIshint() == null ? other.getIshint() == null : this.getIshint().equals(other.getIshint()))
            && (this.getHintinfo() == null ? other.getHintinfo() == null : this.getHintinfo().equals(other.getHintinfo()))
            && (this.getHintimg() == null ? other.getHintimg() == null : this.getHintimg().equals(other.getHintimg()))
            && (this.getProcesstype() == null ? other.getProcesstype() == null : this.getProcesstype().equals(other.getProcesstype()))
            && (this.getRatio() == null ? other.getRatio() == null : this.getRatio().equals(other.getRatio()))
            && (this.getCreateduserid() == null ? other.getCreateduserid() == null : this.getCreateduserid().equals(other.getCreateduserid()))
            && (this.getUpdateduserid() == null ? other.getUpdateduserid() == null : this.getUpdateduserid().equals(other.getUpdateduserid()))
            && (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime()))
            && (this.getUpdatedtime() == null ? other.getUpdatedtime() == null : this.getUpdatedtime().equals(other.getUpdatedtime()))
            && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getModelid() == null) ? 0 : getModelid().hashCode());
        result = prime * result + ((getMalfid() == null) ? 0 : getMalfid().hashCode());
        result = prime * result + ((getOptionname() == null) ? 0 : getOptionname().hashCode());
        result = prime * result + ((getIshint() == null) ? 0 : getIshint().hashCode());
        result = prime * result + ((getHintinfo() == null) ? 0 : getHintinfo().hashCode());
        result = prime * result + ((getHintimg() == null) ? 0 : getHintimg().hashCode());
        result = prime * result + ((getProcesstype() == null) ? 0 : getProcesstype().hashCode());
        result = prime * result + ((getRatio() == null) ? 0 : getRatio().hashCode());
        result = prime * result + ((getCreateduserid() == null) ? 0 : getCreateduserid().hashCode());
        result = prime * result + ((getUpdateduserid() == null) ? 0 : getUpdateduserid().hashCode());
        result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode());
        result = prime * result + ((getUpdatedtime() == null) ? 0 : getUpdatedtime().hashCode());
        result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", modelid=").append(modelid);
        sb.append(", malfid=").append(malfid);
        sb.append(", optionname=").append(optionname);
        sb.append(", ishint=").append(ishint);
        sb.append(", hintinfo=").append(hintinfo);
        sb.append(", hintimg=").append(hintimg);
        sb.append(", processtype=").append(processtype);
        sb.append(", ratio=").append(ratio);
        sb.append(", createduserid=").append(createduserid);
        sb.append(", updateduserid=").append(updateduserid);
        sb.append(", createdtime=").append(createdtime);
        sb.append(", updatedtime=").append(updatedtime);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}